package com.mg.persional.service.impl;

import com.mg.common.vo.ResponseResult;
import com.mg.common.vo.ResponseStatus;
import com.mg.persional.entity.TbMemberDetail;
import com.mg.persional.mapper.TbMemberDetailMapper;
import com.mg.persional.service.TbMemberDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service
public class TbMemberDetailServiceImpl implements TbMemberDetailService {
    @Autowired
    TbMemberDetailMapper tmdm;

    @Override
    public ResponseResult<Integer> delTbMember(int id) {
        return tmdm.delTbMember(id);
    }

    @Override
    public ResponseResult<Integer> updateById(TbMemberDetail tbMemberDetail) {
        int i = tmdm.updateById(tbMemberDetail);
        if (i > 0){
            ResponseResult.ok(i);
        }else {
            ResponseResult.error(ResponseStatus.SERVICE_ERROR);
        }
        return null;
    }
}
